/*
 * XML Type:  persistence-unit-defaults
 * Namespace: http://java.sun.com/xml/ns/persistence/orm
 * Java type: com.googlecode.horncomb.orm.jpa.v10.xmlbeans.PersistenceUnitDefaults
 *
 * Automatically generated - do not modify.
 */
package com.googlecode.horncomb.orm.jpa.v10.xmlbeans.impl;
/**
 * An XML persistence-unit-defaults(@http://java.sun.com/xml/ns/persistence/orm).
 *
 * This is a complex type.
 */
public class PersistenceUnitDefaultsImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements com.googlecode.horncomb.orm.jpa.v10.xmlbeans.PersistenceUnitDefaults
{
    
    /**  */
	private static final long serialVersionUID = -5258518721761189574L;


	public PersistenceUnitDefaultsImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName SCHEMA$0 = 
        new javax.xml.namespace.QName("http://java.sun.com/xml/ns/persistence/orm", "schema");
    private static final javax.xml.namespace.QName CATALOG$2 = 
        new javax.xml.namespace.QName("http://java.sun.com/xml/ns/persistence/orm", "catalog");
    private static final javax.xml.namespace.QName ACCESS$4 = 
        new javax.xml.namespace.QName("http://java.sun.com/xml/ns/persistence/orm", "access");
    private static final javax.xml.namespace.QName CASCADEPERSIST$6 = 
        new javax.xml.namespace.QName("http://java.sun.com/xml/ns/persistence/orm", "cascade-persist");
    private static final javax.xml.namespace.QName ENTITYLISTENERS$8 = 
        new javax.xml.namespace.QName("http://java.sun.com/xml/ns/persistence/orm", "entity-listeners");
    
    
    /**
     * Gets the "schema" element
     */
    public java.lang.String getSchema()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(SCHEMA$0, 0);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "schema" element
     */
    public org.apache.xmlbeans.XmlString xgetSchema()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(SCHEMA$0, 0);
            return target;
        }
    }
    
    /**
     * True if has "schema" element
     */
    public boolean isSetSchema()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(SCHEMA$0) != 0;
        }
    }
    
    /**
     * Sets the "schema" element
     */
    public void setSchema(java.lang.String schema)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(SCHEMA$0, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(SCHEMA$0);
            }
            target.setStringValue(schema);
        }
    }
    
    /**
     * Sets (as xml) the "schema" element
     */
    public void xsetSchema(org.apache.xmlbeans.XmlString schema)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(SCHEMA$0, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(SCHEMA$0);
            }
            target.set(schema);
        }
    }
    
    /**
     * Unsets the "schema" element
     */
    public void unsetSchema()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(SCHEMA$0, 0);
        }
    }
    
    /**
     * Gets the "catalog" element
     */
    public java.lang.String getCatalog()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(CATALOG$2, 0);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "catalog" element
     */
    public org.apache.xmlbeans.XmlString xgetCatalog()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(CATALOG$2, 0);
            return target;
        }
    }
    
    /**
     * True if has "catalog" element
     */
    public boolean isSetCatalog()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(CATALOG$2) != 0;
        }
    }
    
    /**
     * Sets the "catalog" element
     */
    public void setCatalog(java.lang.String catalog)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(CATALOG$2, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(CATALOG$2);
            }
            target.setStringValue(catalog);
        }
    }
    
    /**
     * Sets (as xml) the "catalog" element
     */
    public void xsetCatalog(org.apache.xmlbeans.XmlString catalog)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(CATALOG$2, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(CATALOG$2);
            }
            target.set(catalog);
        }
    }
    
    /**
     * Unsets the "catalog" element
     */
    public void unsetCatalog()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(CATALOG$2, 0);
        }
    }
    
    /**
     * Gets the "access" element
     */
    public com.googlecode.horncomb.orm.jpa.v10.xmlbeans.AccessType.Enum getAccess()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(ACCESS$4, 0);
            if (target == null)
            {
                return null;
            }
            return (com.googlecode.horncomb.orm.jpa.v10.xmlbeans.AccessType.Enum)target.getEnumValue();
        }
    }
    
    /**
     * Gets (as xml) the "access" element
     */
    public com.googlecode.horncomb.orm.jpa.v10.xmlbeans.AccessType xgetAccess()
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.googlecode.horncomb.orm.jpa.v10.xmlbeans.AccessType target = null;
            target = (com.googlecode.horncomb.orm.jpa.v10.xmlbeans.AccessType)get_store().find_element_user(ACCESS$4, 0);
            return target;
        }
    }
    
    /**
     * True if has "access" element
     */
    public boolean isSetAccess()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(ACCESS$4) != 0;
        }
    }
    
    /**
     * Sets the "access" element
     */
    public void setAccess(com.googlecode.horncomb.orm.jpa.v10.xmlbeans.AccessType.Enum access)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(ACCESS$4, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(ACCESS$4);
            }
            target.setEnumValue(access);
        }
    }
    
    /**
     * Sets (as xml) the "access" element
     */
    public void xsetAccess(com.googlecode.horncomb.orm.jpa.v10.xmlbeans.AccessType access)
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.googlecode.horncomb.orm.jpa.v10.xmlbeans.AccessType target = null;
            target = (com.googlecode.horncomb.orm.jpa.v10.xmlbeans.AccessType)get_store().find_element_user(ACCESS$4, 0);
            if (target == null)
            {
                target = (com.googlecode.horncomb.orm.jpa.v10.xmlbeans.AccessType)get_store().add_element_user(ACCESS$4);
            }
            target.set(access);
        }
    }
    
    /**
     * Unsets the "access" element
     */
    public void unsetAccess()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(ACCESS$4, 0);
        }
    }
    
    /**
     * Gets the "cascade-persist" element
     */
    public com.googlecode.horncomb.orm.jpa.v10.xmlbeans.EmptyType getCascadePersist()
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.googlecode.horncomb.orm.jpa.v10.xmlbeans.EmptyType target = null;
            target = (com.googlecode.horncomb.orm.jpa.v10.xmlbeans.EmptyType)get_store().find_element_user(CASCADEPERSIST$6, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * True if has "cascade-persist" element
     */
    public boolean isSetCascadePersist()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(CASCADEPERSIST$6) != 0;
        }
    }
    
    /**
     * Sets the "cascade-persist" element
     */
    public void setCascadePersist(com.googlecode.horncomb.orm.jpa.v10.xmlbeans.EmptyType cascadePersist)
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.googlecode.horncomb.orm.jpa.v10.xmlbeans.EmptyType target = null;
            target = (com.googlecode.horncomb.orm.jpa.v10.xmlbeans.EmptyType)get_store().find_element_user(CASCADEPERSIST$6, 0);
            if (target == null)
            {
                target = (com.googlecode.horncomb.orm.jpa.v10.xmlbeans.EmptyType)get_store().add_element_user(CASCADEPERSIST$6);
            }
            target.set(cascadePersist);
        }
    }
    
    /**
     * Appends and returns a new empty "cascade-persist" element
     */
    public com.googlecode.horncomb.orm.jpa.v10.xmlbeans.EmptyType addNewCascadePersist()
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.googlecode.horncomb.orm.jpa.v10.xmlbeans.EmptyType target = null;
            target = (com.googlecode.horncomb.orm.jpa.v10.xmlbeans.EmptyType)get_store().add_element_user(CASCADEPERSIST$6);
            return target;
        }
    }
    
    /**
     * Unsets the "cascade-persist" element
     */
    public void unsetCascadePersist()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(CASCADEPERSIST$6, 0);
        }
    }
    
    /**
     * Gets the "entity-listeners" element
     */
    public com.googlecode.horncomb.orm.jpa.v10.xmlbeans.EntityListeners getEntityListeners()
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.googlecode.horncomb.orm.jpa.v10.xmlbeans.EntityListeners target = null;
            target = (com.googlecode.horncomb.orm.jpa.v10.xmlbeans.EntityListeners)get_store().find_element_user(ENTITYLISTENERS$8, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * True if has "entity-listeners" element
     */
    public boolean isSetEntityListeners()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(ENTITYLISTENERS$8) != 0;
        }
    }
    
    /**
     * Sets the "entity-listeners" element
     */
    public void setEntityListeners(com.googlecode.horncomb.orm.jpa.v10.xmlbeans.EntityListeners entityListeners)
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.googlecode.horncomb.orm.jpa.v10.xmlbeans.EntityListeners target = null;
            target = (com.googlecode.horncomb.orm.jpa.v10.xmlbeans.EntityListeners)get_store().find_element_user(ENTITYLISTENERS$8, 0);
            if (target == null)
            {
                target = (com.googlecode.horncomb.orm.jpa.v10.xmlbeans.EntityListeners)get_store().add_element_user(ENTITYLISTENERS$8);
            }
            target.set(entityListeners);
        }
    }
    
    /**
     * Appends and returns a new empty "entity-listeners" element
     */
    public com.googlecode.horncomb.orm.jpa.v10.xmlbeans.EntityListeners addNewEntityListeners()
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.googlecode.horncomb.orm.jpa.v10.xmlbeans.EntityListeners target = null;
            target = (com.googlecode.horncomb.orm.jpa.v10.xmlbeans.EntityListeners)get_store().add_element_user(ENTITYLISTENERS$8);
            return target;
        }
    }
    
    /**
     * Unsets the "entity-listeners" element
     */
    public void unsetEntityListeners()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(ENTITYLISTENERS$8, 0);
        }
    }
}
